import { Component, EventEmitter, Input, Output } from '@angular/core';

@Component({
  selector: 'app-person',
  templateUrl: './person.component.html',
  styleUrls: ['./person.component.less']
})
export class PersonComponent {
  @Input("name") name:string = "";
  @Input() age:number = 0;
  @Output() sendData = new EventEmitter;
  onClick(){
    this.sendData.emit("我是子组件中的事件")
  }
}
